package com.asen.commons.core.meta.enums;

import com.asen.commons.core.base.IntegerEnum;

/**
 * 条件符号
 *
 * @author Gary
 * @version 1.0
 * @date 2018-11-16
 */
public enum FilterSymbolEnum implements IntegerEnum {
    /**
     * 符号
     */
    EQUAL(1, " = "),

    NOT_EQUAL(2, " <> "),

    GREATER(3, " > "),

    LESS(4, " < "),

    GREATER_EQUAL(5, " >= "),

    LESS_EQUAL(6, " <= "),

    LIKE(7, " LIKE "),

    NOT_LIKE(8, " NOT LIKE "),

    LEFT_LIKE(9, " LIKE "),

    NOT_LEFT_LIKE(10, " NOT LIKE "),

    RIGHT_LIKE(11, " LIKE "),

    NOT_RIGHT_LIKE(12, " NOT LIKE "),

    IN(13, " IN "),

    NOT_IN(14, " NOT IN "),

    IS_NULL(15, " IS NULL"),

    IS_NOT_NULL(16, " IS NOT NULL"),

    COMPARE_EQUAL(17, " = "),

    COMPARE_NOT_EQUAL(22, " != "),

    COMPARE_GREATER(18, " > "),

    COMPARE_GREATER_EQUAL(19, " >= "),

    COMPARE_LESS(20, " < "),

    COMPARE_LESS_EQUAL(21, " <= "),

    COMPARE_EQUAL_ABS(23, " = "),

    COMPARE_NOT_EQUAL_ABS(28, " != "),

    COMPARE_GREATER_ABS(24, " > "),

    COMPARE_GREATER_EQUAL_ABS(25, " >= "),

    COMPARE_LESS_ABS(26, " < "),

    COMPARE_LESS_EQUAL_ABS(27, " <= "),

    COMPARE_EQUAL_VALUE(29, " = "),

    COMPARE_NOT_EQUAL_VALUE(30, " != "),

    COMPARE_EQUAL_VALUE_ABS(31, " = "),

    COMPARE_NOT_EQUAL_VALUE_ABS(32, " != "),

    EQUAL_IGNORE_CASE(33, " = "),

    LIKE_IGNORE_CASE(34, " LIKE "),

    CUSTOM(99, " ");

    private Integer key;

    private String val;

    private FilterSymbolEnum(Integer key, String val) {
        this.key = key;
        this.val = val;
    }

    @Override
    public Integer getValue() {
        return key;
    }

    @Override
    public String getDesc() {
        return val;
    }

}
